<%@page import="com.neiquan.backstage.pub.bsc.dao.po.PlatformArticle"%>
<%@page import="com.neiquan.backstage.platform_article.PlatformArticleService"%>
<%@page import="com.neiquan.backstage.common.CommonService"%>
<%@page import="com.neiquan.backstage.common.util.SpringContextUtils"%>
<%@page import="java.util.List"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
ApplicationContext appCtx = SpringContextUtils.getApplicationContext();
CommonService commonService = appCtx.getBean(CommonService.class);
PlatformArticleService articleService = appCtx.getBean(PlatformArticleService.class);
List<PlatformArticle> articleList = articleService.queryAll();
pageContext.setAttribute("articleList", articleList);
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>干货列表</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="css/base.css" />
	<link rel="stylesheet" href="css/main.css" />
</head>
<body>
	<section class="mt">
		<c:forEach var="article" items="${pageScope.articleList}">
			<a href="platform_article_detail.jsp?id=${article.articleId}">
				<section class="apply hotfocus common_bg">
					<c:if test="${not empty article.imgUrl}">
						<span class="hot-img-span">
							<img src="${article.imgUrl}" class="fl hot-img pd" style="width:55px;" alt="" />
						</span>
					</c:if>
					<section class="fl pd hot-right">
						<span class="hot_detail">
							${article.title}
						</span><br>
						<time><%=commonService.formatTimestamp(((PlatformArticle)pageContext.getAttribute("article")).getDtCreat(),"yyyy-MM-dd")%></time>
					</section>
				</section>
			</a>
			<section class="line"></section>
		</c:forEach>
	</section>
</body>
<script src="js/responsive.js"></script>
</html>
